package com.aloha.boot02.config.prop;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author DaiZhiHeng
 * @date 2023/10/2 21:49
 */
@Data
@Component
@ConfigurationProperties(prefix = "db")
public class DataBaseProperties {

    private Persistence mysql;

    private Cache redis;

    @Data
    public static class Persistence {
        private String username;
        private String password;
    }

    @Data
    public static class Cache {
        private String username;
        private String password;
    }
}
